# $Id$
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>

pkgname=libpeas
pkgver=1.20.0
pkgrel=2
pkgdesc="A GObject-based plugins engine"
arch=(i686 x86_64)
url="http://www.gtk.org/"
license=(GPL2)
depends=(gtk3 gobject-introspection-runtime)
makedepends=(gtk-doc intltool python-gobject python2-gobject glade gobject-introspection git
             gnome-common)
_commit=7548b2717160e33a806bcfa8aaaac7894f4abccc
source=("git://git.gnome.org/libpeas#commit=$_commit")
sha256sums=('SKIP')


pkgver() {
  cd $pkgname
  git describe --tags | sed 's/^libpeas-//;s/-/+/g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd $pkgname
  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
    --enable-gtk-doc --disable-static

  # https://bugzilla.gnome.org/show_bug.cgi?id=655517
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool

  make
}

check() {
  cd $pkgname
  make check
}

package() {
  cd $pkgname
  make DESTDIR="${pkgdir}" install
}

# vim:set ts=2 sw=2 et:
